package com.pkuse.bjousystem;

public interface AuthEntity {
    public String getAuthUsername();

    public String getAuthPassword();

    public AuthType getAuthType();

    public enum AuthType {
        Student("student"), School("school"), Zw("zw");
        private String type;
        AuthType(String type) {
            this.type = type;
        }
        public String getType() {
            return type;
        }
        public static AuthType fromString(String type) {
            for (AuthType authType : AuthType.values()) {
                if (authType.type.equalsIgnoreCase(type)) {
                    return authType;
                }
            }
            throw new UnsupportedEntityTypeException(type);
        }
    }
}
